<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 客服账号表
 */
class CreateWxKfAccount extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_kf_accounts', function (Blueprint $table) {
            $table->increments('id')->comment('客服ID');
            $table->unsignedInteger('kf_id')->default(0)->comment('客服编号');
            $table->string('kf_account', 100)->default('')->comment('完整客服帐号');
            $table->string('kf_headimgurl', 150)->default('')->comment('客服头像');
            $table->string('kf_nick', 50)->default('')->comment('客服昵称');
            $table->string('kf_wx', 100)->default('')->comment('客服绑定微信号');
            $table->string('invite_wx', 10)->default('')->comment('绑定邀请微信号');
            $table->timestamp('invite_expire_time')->nullable()->comment('邀请过期时间');
            $table->string('invite_status')->default('')->comment('邀请状态');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_kf_accounts');
    }
}